import {customeStruct} from '../utils';
const itf = customeStruct.interface;
export const List = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            brandCode: 'string? | null',
            dealerCode: 'string? | null',
            code: 'string? | null',
            partContractInvoiceCode: 'string? | null',
            priceTerms: 'number? | null',
            importerCantact: 'string? | null',
            forwarder: 'string? | null',
            loadingPort: 'string? | null',
            destinationPort: 'string? | null',
            dischargePort: 'string? | null',
            shippingFee: 'number? | null',
            createTime: 'datetime? | null',
            options: ['string']
        })],
        totalElements: 'number'
    })
});


export const Detail = itf({
    payload: itf(
        {
            id: 'string',
            code: 'string? | null',
            branchCode: 'string? | null',
            branchName: 'string? | null',
            brandId: 'string? | null',
            brandCode: 'string? | null',
            brandName: 'string? | null',
            dealerCode: 'string? | null',
            dealerName: 'string? | null',
            partContractInvoiceCode: 'string? | null',
            exporter: 'string? | null',
            importer: 'string? | null',
            priceTerms: 'number? | null',
            importerCantact: 'string? | null',
            importerNumber: 'string? | null',
            contactEmail: 'string? | null',
            contactFax: 'string? | null',
            notifyParty: 'string? | null',
            loadingPort: 'string? | null',
            forwarderContact: 'string? | null',
            forwarderNumber: 'string? | null',
            forwarderFax: 'string? | null',
            forwarder: 'string? | null',
            destinationPort: 'string? | null',
            dischargePort: 'string? | null',
            shippingFee: 'number? | null',
            carrier: 'string? | null',
            remark: 'string? | null',
            shippingMark: 'string? | null',
            description: 'string? | null',
            createTime: 'datetime? | null',
            volumeTotal: 'number? | null',
            packingListTotal: 'number? | null',
            grossWeightTotal: 'number? | null',
            rowVersion: 'string? | null',
            options: [
                'string'
            ],
           
        },
    )
});

export const Brand = itf({
    payload: itf({
        content: [
            itf({
                id: 'string',
                code: 'string',
                name: 'string',
            })
        ],
    })
});
export const Order = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            brandId: 'string? | null',
            code: 'string? | null',
            partContractInvoiceCode: 'string? | null',
            invoicedDate: 'datetime? | null',
            status: 'number? | null',
            partShipOrderStatus: 'number? | null',
            partShipNoticeStatus: 'number? | null',
            shipmentType: 'number? | null',
            origin: 'string? | null',
            destination: 'string? | null',
            forwarder: 'string? | null',
            invoiceAmount: 'number? | null',
            seller: 'string? | null',
            buyer: 'string? | null',
            priceTerms: 'number? | null',
            shippingMark: 'string? | null',
            companySeal: 'string? | null',
            volumeTotal: 'number? | null',
            packingListTotal: 'number? | null',
            grossWeightTotal: 'number? | null',
        })],
        totalElements: 'number? | null'
    })
});

export const DealerList = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            code: 'string',
            name: 'string',
            shortCode: 'string? | null',
            shortName: 'string? | null',
            countryName: 'string? | null',
            provinceName: 'string? | null',
            cityName: 'string? | null',
            contactPhone: 'string? | null',
            address: 'string? | null',
        })],
    })
});

export const MarketDepartmentList = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            code: 'string',
            name: 'string',
            isLeaf: 'boolean',
        })],
    })
});

export const RegionList = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            name: 'string',
        })],
    })
});
